//package com.per.mybootall.kafka;
//
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.kafka.annotation.KafkaListener;
//import org.springframework.kafka.annotation.TopicPartition;
//import org.springframework.kafka.support.Acknowledgment;
//import org.springframework.stereotype.Component;
//import org.springframework.util.CollectionUtils;
//
//import java.util.List;
//
//@Component
//public class KafkaConsumerCopy {
//    @KafkaListener(id = "yyyConsumer2", topicPartitions = {
//            @TopicPartition(topic = "myKafkaTopic", partitions = "0")},
//            groupId = "1")
//    public void onDataChangeMessage1(List<String> messageList, Acknowledgment ack) {
//        if (CollectionUtils.isEmpty(messageList)) {
//            ack.acknowledge();
//            return;
//        }
//
//        for (String message : messageList) {
//            System.out.println("kafka消费者2：-----------------------------------------------------------------------------------:" + message);
//        }
//    }
//
//}
